<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            let num = Number(window.parseInt(prompt("请输入")));
            if (num - parseInt(num) === 0 && num <= 7) {
                alert("今天是星期" + num);
            } else {
                alert("输入有误");
            }
        </script>
    </body>
</html>
